"""
pytest中共享fixture模块
"""
import pytest
import requests
from common.tools import user_login
from common.tools import user_register

@pytest.fixture
def token():
    data = {
        "app_key": "74F287834A1EC175B7AD5A537202E45C",
        "username": "我磊哥",
        "password": "e10adc3949ba59abbe56e057f20f883e"
    }

    r = requests.post(url="http://hn216.api.yesapi.cn/api/App/User/Login", data=data)
    token = r.json().get("data").get("token")
    return token

# @pytest.fixture
# def token_uuid():
#     user_register()
#     token, uuid = user_login()
#     return token,uuid